package executors.completable.future;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class RunAsync001 {
  public static void main(String[] args) throws ExecutionException, InterruptedException {
    ExecutorService executors = Executors.newFixedThreadPool(1);
    
    CompletableFuture<Void> runAsync = CompletableFuture.runAsync(() -> {
      System.out.println(Thread.currentThread().getName());
      System.out.println("run async");
    }, executors);
  }
}
